export default {
  namespace: 'flowConfig',
  state: {
    id: '',
    canvasObj: {
      flowName: '',
      flowCode: '',
      version: '',
      limitValue: '',
      alertValue: '',
      timeUnit: undefined,
    },
    operType: '',
  },

  effects: {},

  reducers: {
    savePassId(state, { payload: params }) {
      return {
        ...state,
        id: params,
      };
    },
    saveCanvas(state, { payload: params }) {
      return {
        ...state,
        canvasObj: params,
      };
    },
    saveOperType(state, { payload: params }) {
      return {
        ...state,
        operType: params,
      };
    },
  },
};
